#ifndef	_TIMER_H_
#define	_TIMER_H_

#define BASE_TICK 5

#define TIMER_ONCE_AUTODEL 1
#define TIMER_INTERVAL 2
#define TIMER_REMOVE_HEAP 16

#define DIFF_TICK(a,b) ((int)((a)-(b)))

// Struct declaration
struct TimerData;
struct TimerData {
	unsigned int tick;
	int (*func)(struct TimerData *tm);
	int ticks;
	// struct chain_node *node; // back link to remove it if necessary? Nah
};

// Function prototype declaration
unsigned int gettick_nocache(void);
unsigned int gettick(void);

int timer_do( struct chain_set *set ) {
	struct
}

int add_timer(chain_set *set, int miliseconds, (*int)proc()) {

}
int delete_timer(int,int (*)(int,unsigned int,int,int));
int do_timer(unsigned int tick);
struct TimerData *get_timer(int tid);

#endif	// _AME_TIMER_H_
